// definition of detection of ai studio
function labelDef(data = {}) {
    // 定义模版
    let instance = {
        label_format: 'studio', // extended
        id: 0, // from coco-text
        text: '', // from paddleocr
        points: [], // from paddleocr
        bbox: [], // from coco-text
        ignore: 0, // from coco-text
        language: "english" // from coco-text
    };

    // 根据data中有的key去更新里面的数据
    for (let key in data) {
        instance[key] = data[key];
    }

    return instance;
}

export default labelDef;
